﻿/*
 * GridFrame
 * 
 * initial implementation : 20.11.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Collections.Generic;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Petra.Gis.Geometry.Support;


namespace Petra.Gis.Geometry.GridSupport
{

  /// <summary>
  /// represents single Frame of Grid data. Each grid must have at least one <c>GridFrame</c>
  /// Some Grid formats can support multiple grid layers/pages/frames/Overviews in single GridData, eg. GeoTiff
  /// WPF BitmapFrame can't be used, this class is replacement for it.
  /// </summary>
  public abstract class GridFrameBase
  {
    
    //GridCells _cells;

    //List<GridBlock> _blocks = new List<GridBlock>();
    

    //object _frame; //tiff frame or specific image


    

    //public GridCells Cells
    //{
    //  get { return _cells; }
    //}





    /// <summary>
    /// must override, get/set bounds of current GridFrame
    /// </summary>
    //public abstract BoundingBox Bounds { get; set; }



    /// <summary>
    /// get/set spatial bounds of current GridFrame
    /// </summary>
    public virtual BoundingBox Bounds
    { get; set; }




    //public abstract GridBlock[] Blocks { get; }




    //public abstract GridBlock[,] BlockDiagram { get; }






    /// <summary>
    /// must override, gets Width of GridFrame as number of cells in horizontal direction
    /// </summary>
    public abstract int Width {get;}






    /// <summary>
    /// must override, gets Height of GridFrame as number of cells in vertical direction
    /// </summary>
    public abstract int Height {get;}




    //public abstract int BlockWidth { get; }




    //public abstract int BlockHeight { get; }






    /// <summary>
    /// must override, gets PixelFormat of GridFrame.
    /// </summary>
    public abstract PixelFormat PixelFormat { get; }




    //public abstract GridFrame SelectBlocksByRange(BoundingBox range);
    //public abstract Int32Rect SelectCellsByRange(BoundingBox aproxRange);




    //public abstract int NumBlocksHorizontal { get; }




    //public abstract int NumBlocksVertical { get; }



    /// <summary>
    /// must override. Gets Color palette for grids that supports it.
    /// When grid has no color palette, null must be returned.
    /// </summary>
    public abstract object Palette { get; }





    /// <summary>
    /// grid frame must publish data as BitmapSource.
    /// BitmapSource is available on all MSFT platforms.
    /// Grid data without color information must be resolved
    /// prior display on map to get at least some graphic output.
    /// </summary>
    public BitmapSource Data { get; protected set; }
    //public abstract object Data { get; }

  }
}
